import './style/element_visiable.scss'
import { createApp } from 'vue'
// 引入gin-vue-admin前端初始化相关内容
import './core/gin-vue-admin'
// 引入封装的router
import router from '@/router/index'
import '@/permission'
import run from '@/core/gin-vue-admin.js'
import auth from '@/directive/auth'
import { store } from '@/pinia'
import App from './App.vue'
import { initDom } from './utils/positionToCode'
import i18n from './lang'
import relatedBtn from '@/components/relatedInfor/relatedBtn.vue'
import { dragTable } from "@/utils/dragTable.js";
import Vant from 'vant'
import 'vant/lib/index.css'
initDom()
/**
 * @description 导入加载进度条，防止首屏加载时间过长，用户等待
 *
 * */
import Nprogress from 'nprogress'
import 'nprogress/nprogress.css'
Nprogress.configure({ showSpinner: false, ease: 'ease', speed: 500 })
Nprogress.start()

/**
 * 无需在这块结束，会在路由中间件中结束此块内容
 * */

const app = createApp(App)
app.config.productionTip = false


// 拖拽表格全局方法挂载
app.config.globalProperties.$dragTable = dragTable;

app
  .use(run)
  .use(store)
  .use(auth)
  .use(router)
  .use(i18n)
  .use(Vant)
  .component('relatedBtn',relatedBtn)
  .mount('#app')

export default app
